package com.food.entity;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.List;

/**
 * @author : 港某
 * @date : 2021/1/8 18:08
 */
@Data
public class LayuiR<T> {

    private int code = 0;
    private String msg = "";
    private int count;
    private List<T> data;

    public LayuiR(Page<T> page) {
        this.data = page.getRecords();
        this.count = Integer.parseInt(String.valueOf(page.getTotal()));
    }

}
